/*
* 类型校验
可选参数
默认值
接口定义函数  (参数):返回值类型
定义剩余参数  ...
函数重载
* */
function f(arg1:number,arg2:number):number {
    return arg1+arg2
}
function f2(arg1:number,arg2?:number):number {
    return arg1+arg2
}
function f3(arg1:number = 0,arg2:number = 0):number {
    return arg1+arg2
}
interface Add {
    (arg1:number,arg2:number):number
}
let AddImpl:Add = (arg1=0, arg2=0) :number=>{
    return arg1+arg2
}
let number = AddImpl(1,1);
console.log(number)

function a (arg1: any)
function a (arg1: any,arg2: number): void
function a (arg1: string): void{
    console.log(arg1)
    console.log(arguments)
}
a(1,2)





